-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ECS fields in Elastic Log Driver, change index prefix #20522
Fix ECS fields in Elastic Log Driver, change index prefix #20522
Conversation
Pinging @elastic/integrations (Team:Integrations) |
hostname, err := os.Hostname() | ||
if err != nil { | ||
fatal("Error fetching hostname: %s", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating and passing the hostname around from here, would it make sense to create a beat.Info instead?
|`name` | ||
|`testbeat` | ||
| A custom value that will be inserted into the document as `agent.name`. | ||
If not set, it will be the same value as `agent.type` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a little confusing for Beats users. Libbeat also provides a 'global' name
setting, but defaults to the hostname if name
is not configured. This is done, because name
is used by users to identify a single instance (e.g. if multiple beats are run on a single host). Do we want to default to the hostname instead of agent.type
as well?
Yah, @urso The use of |
The hostname. According to our docs the 'name' setting defaults to hostname: https://www.elastic.co/guide/en/beats/filebeat/current/configuration-general-options.html#_name
|
So, right now it looks like we're "in line" with how other parts of libbeat work. We default to the hostname if the user doesn't set anything. |
Alright, fixed the docs so hopefully it's a little more clear. |
) * change index names, clean up code * update docs * fix up metadata handling * fix docs * add changelog entry (cherry picked from commit a8f9cc8)
What does this PR do?
logs-docker
so documents show up in the Kibana logs UIWhy is it important?
Although the ECS fields themselves are an issue, we also want Log Driver documents to be easily discoverable in Kibana with little additional configuration. The Logs UI will look for
logs-*
index patterns by default.Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
mage BuildAndInstall
host.*
andcontainer.*
fields are correct, and that logs show up in the Kibana log UI